package com.nick.order.controller;

import com.nick.order.feign.PayFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: OrderContrller
 * @Descpriction: 订单接口
 * @author: zhangchao
 * @date: 2020/4/28 14:46
 * @version: 1.0
 */
@RequestMapping("order")
@RestController
@Slf4j
public class OrderContrller {
    @Autowired
    private PayFeign payFeign;

    @RequestMapping("createOrder")
    public String createOrder() {
        String payResult = payFeign.pay();
        return "创建订单成功:" + payResult;
    }
}
